Skip to content

Support guest profiling for components#593

Merged
posborne merged 2 commits intomainfrom
component-model-guest-profiling
Apr 1, 2026
Merged

Support guest profiling for components#593
posborne merged 2 commits intomainfrom
component-model-guest-profiling

Conversation

@posborne
Copy link
Copy Markdown
Member

This change follows with the work I did in upstream wasmtime to support guest profiling for components:
bytecodealliance/wasmtime#10507

Integration tests for both components and core modules were added to ensure we have some coverage of the guest profiling (just ensuring it generates profiler output).

This change follows with the work I did in upstream wasmtime
to support guest profiling for components:
bytecodealliance/wasmtime#10507

Integration tests for both components and core modules were
added to ensure we have some coverage of the guest profiling
(just ensuring it generates profiler output).
@posborne posborne force-pushed the component-model-guest-profiling branch from aeadcc9 to 5600294 Compare March 23, 2026 19:32
@posborne posborne requested a review from dgohman-fastly March 27, 2026 16:08
pub fn with_guest_profiling(mut self, config: viceroy_lib::GuestProfileConfig) -> Self {
self.guest_profile_config = Some(config);
self
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there also be a with_profiling_strategy method for setting the profiling_strategy field?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I had plumbed that through but didn't write additional tests for those bits (as my changes are isolated to guest profiling). The naming and plumbing of some of these config bits is a bit confusing as the profiling strategy is unique to native profiling (not guest).

I have some changes now that consolidate things down to a single profiling_config which consolidates the guest/native/none paths in a single field. It's a fairly large change in terms of files touched, so I'm inclined to land this change as-is and then separately open up that change for review separately as it is beyond the scope of what we're changing here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

@dgohman-fastly dgohman-fastly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense; thanks!

@posborne posborne merged commit 2ebc3e1 into main Apr 1, 2026
14 checks passed
@posborne posborne deleted the component-model-guest-profiling branch April 1, 2026 20:20
sgammon pushed a commit to elide-tools/Viceroy that referenced this pull request Apr 14, 2026
This change follows with the work I did in upstream wasmtime
to support guest profiling for components:
bytecodealliance/wasmtime#10507

Integration tests for both components and core modules were
added to ensure we have some coverage of the guest profiling
(just ensuring it generates profiler output).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants